package utilidades.tags;

import java.io.IOException;
import java.util.Date;
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;

public class SubmitTag extends TagSupport
{
	private String	accept;
	private String	cancel;

	public String getAccept() {
		return accept;
	}

	public void setAccept(String accept) {
		this.accept = accept;
	}

	public String getCancel() {
		return cancel;
	}

	public void setCancel(String cancel) {
		this.cancel = cancel;
	}

	public int doStartTag() throws JspTagException {
		return EVAL_BODY_INCLUDE;
	}

	public int doEndTag() throws JspTagException {
		JspWriter out = pageContext.getOut();

		try {
			out.write("<tr>");
			out.write("<td colspan=2 align=center>");
			if (accept!=null)
				out.write("<input type=submit name=aceptar value='"+accept+"'>\n");
			out.write("</td>");
			out.write("</tr>\n");
		}
		catch (IOException ex) {
			throw new JspTagException("Error en tag Text");
		}

		return EVAL_PAGE;
	}
}
